Skip to content

python-sdk: Support regions/vpc-availability endpoints#646

Open
mgwoj wants to merge 4 commits intolinode:devfrom
mgwoj:feature/TPT-4109-python-sdk-support-regions-vpc-availability-endpoints
Open

python-sdk: Support regions/vpc-availability endpoints#646
mgwoj wants to merge 4 commits intolinode:devfrom
mgwoj:feature/TPT-4109-python-sdk-support-regions-vpc-availability-endpoints

Conversation

@mgwoj
Copy link

@mgwoj mgwoj commented Feb 13, 2026

📝 Description

Added support regions/vpc-availability endpoints:

  • List all vpc availability endpoints
  • Get vpc availability endpoint

Also added support for get availability endpoint

✔️ How to Test

make test-unit

make TEST_SUITE="region" test-int

@mgwoj mgwoj requested a review from a team as a code owner February 13, 2026 14:56
@mgwoj mgwoj requested review from ezilber-akamai and yec-akamai and removed request for a team February 13, 2026 14:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for VPC availability endpoints in the Python SDK, enabling users to query which regions support VPC functionality and what IPv6 prefix lengths are available. The PR also adds support for retrieving availability information for a specific region.

Changes:

  • Added vpc_availability() and vpc_availability_get() methods to RegionGroup for listing and retrieving VPC availability data
  • Added availability_get() method to RegionGroup for retrieving availability data for a specific region
  • Added vpc_availability property to Region object for convenient access to VPC availability data
  • Introduced RegionVPCAvailability dataclass to represent VPC availability information

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
linode_api4/groups/region.py Added three new methods: availability_get, vpc_availability, and vpc_availability_get for retrieving region availability data
linode_api4/objects/region.py Added vpc_availability property to Region class and RegionVPCAvailability dataclass
test/unit/groups/region_test.py Added unit tests for new VPC availability and availability_get methods; cleaned up existing test assertions
test/unit/objects/region_test.py Added unit test for Region.vpc_availability property
test/integration/models/region/test_region.py Added comprehensive integration tests covering all three access patterns for VPC availability and the new availability_get method
test/fixtures/regions_vpc-availability.json Added fixture data for VPC availability listing endpoint with pagination support
test/fixtures/regions_us-east_vpc-availability.json Added fixture data for single region VPC availability endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
"region": "us-east",
"available": true,
"available_ipv6_prefix_lengths": [52, 60]
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The available_ipv6_prefix_lengths values for us-east region are inconsistent between the two fixtures. In regions_vpc-availability.json (line 6), it's [52, 48], but in regions_us-east_vpc-availability.json (line 4), it's [52, 60]. These should be the same since they represent the same region. Please verify which values are correct and update one of the fixtures accordingly.

Suggested change
"available_ipv6_prefix_lengths": [52, 60]
"available_ipv6_prefix_lengths": [52, 48]

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments